package service.auth.impl;

import java.util.Map;

import model.auth.Users;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import service.auth.UsersService;
import core.base.page.Page;
import core.base.page.PageRequest;
import dao.auth.UsersDao;

@Service("auth.UsersService")
public class UsersServiceImpl implements UsersService {
	@Autowired
	@Qualifier("auth.UsersDao")
	private UsersDao usersDao;

	public int deleteById(Long id) {
		return usersDao.deleteById(id);
	}

	public Users getById(Long id) {
		return usersDao.getById(id);
	}

	public void insert(Users model) {
		usersDao.insert(model);
	}

	public Page<Users> queryForPage(PageRequest<Map> pageReq) {
		Page<Users> page = usersDao.queryForPage(pageReq);
		return page;
	}

	public void setUsersDao(UsersDao usersDao) {
		this.usersDao = usersDao;
	}

}
